Method implemented by a data processing apparatus, and charged particle beam device for inspecting a specimen using such a method

ABSTRACT

The invention relates to a method implemented by a data processing apparatus, comprising the steps of receiving an image; providing a set-point for a desired image quality parameter of said image; and processing said image using an image analysis technique for determining a current image quality parameter of said image. In the method, the current image quality parameter is compared with said desired set-point. Based on said comparison, a modified image is generated by using an image modification technique. The generating comprises the steps of improving said image in terms of said image quality parameter in case said current image quality parameter is lower than said set-point; and deteriorating said image in terms of said image quality parameter in case said current image quality parameter exceeds said set-point. The modified image is then output.

FIELD OF THE INVENTION

The invention relates to a method implemented by a data processingapparatus. The invention further relates to a charged particle beamdevice for inspecting a specimen using such a method.

BACKGROUND OF THE INVENTION

Charged particle microscopy is a well-known and increasingly importanttechnique for imaging microscopic objects, particularly in the form ofelectron microscopy. Historically, the basic genus of electronmicroscope has undergone evolution into a number of well-known apparatusspecies, such as the Transmission Electron Microscope (TEM), ScanningElectron Microscope (SEM), and Scanning Transmission Electron Microscope(STEM), and also into various sub-species, such as so-called “dual-beam”apparatus (e.g. a FIB-SEM), which additionally employ a “machining”Focused Ion Beam (FIB), allowing supportive activities such as ion-beammilling or Ion-Beam-Induced Deposition (IBID), for example. The skilledperson will be familiar with the different species of charged particlemicroscopy.

In an SEM, irradiation of a sample by a scanning electron beamprecipitates emanation of “auxiliary” radiation from the sample, in theform of secondary electrons, backscattered electrons, X-rays andcathodoluminescence (infrared, visible and/or ultraviolet photons). Oneor more components of this emanating radiation may be detected and usedfor sample analysis.

In a TEM, a beam of electrons is transmitted through a specimen to forman image from the interaction of the electrons with the sample as thebeam is transmitted through the specimen. The image is then magnifiedand focused onto an imaging device, such as a fluorescent screen, alayer of photographic film, or a sensor such as a scintillator attachedto a charge-coupled device (CCD). The scintillator converts primaryelectrons in the microscope to photons so that the CCD is able to detectit.

Charged particle microscopy may yield images of a sample to be studied.It is often required that the obtained images are to be processed. Saidprocessing may comprise analyzing and/or manipulating an acquired image.For example, in SEM images of cell membranes of brain tissue it isdesirable that a segmentation technique is performed on the images. Forthis task, an Artificial Neural Network (ANN) and/or ConvolutionalNeural Network (CNN) may be used. Although reasonably robust againstdifferent imaging conditions, still the segmentation quality drops ifthe data is noisier, has less focus, or is in some other way affected byinappropriate instrument conditions. This is undesirable of course as itmay lead to subsequent errors, including wrong medical decisions.

One way of overcoming this degradation in analysis and/or manipulationresults, is by retraining the network using the new conditions toaccount for these variations. However, that poses a significant problemif the network is in a production (customer) environment, where networkretraining is often not a valid option as retraining is expensive due tocomputation time and often requires expert input for good labels.

Thus, one of the biggest challenges for ANNs and CNNs for use in imageprocessing remains the fact that it is highly dependent on the stabilityof the imaging conditions and/or imaging parameters.

SUMMARY

It is therefore an object of the present invention to provide a methodthat can be used to overcome one or more of the drawbacks of the use ofANN and/or CNN in processing of an image.

To this end, a method implemented by a data processing apparatus isprovided. The method as defined herein comprises the steps of receivingan image, providing a set-point for a desired image quality parameter ofsaid image and processing said image using an image analysis techniquefor determining a current image quality parameter of said image. Then,the current image quality parameter is compared with said desiredset-point. In other words, an image is provided and analysed fordetermining an image-related parameter, which is then checked to see ifit matches a desired quality. Based on the results of said comparison, amodified image is generated by using an image modification technique.This image modification technique may comprise the use of an ANN and/orCNN.

As defined herein, said step of generating the modified image comprisesthe steps of improving said image in terms of said image qualityparameter in case said current image quality parameter is lower thansaid set-point; and deteriorating said image in terms of said imagequality parameter in case said current image quality parameter exceedssaid set-point. In other words, based on the results of the comparison,either one of two actions is possible. In the first case, the imagequality is lower than a desired value. In this case the image isimproved by using the image modification technique to ensure that theimage quality of the modified image is improved. In the second case, theimage quality is higher than a desired value. In this case the image isdeteriorated on purpose by using the image modification technique, toensure that the image quality of the modified image is, in fact,lowered. As defined herein, the modified image is then output andanalysed by an ANN and/or CNN. It follows from the above that thecorresponding ANN and/or CNN that is used for the analysis is trained onan image set, wherein each of the images in the image set substantiallyhas the desired image quality parameter.

As an example, the method as defined herein may comprise the step ofproviding a substantially noise-less image, and the method as definedherein may comprise the step of deteriorating said image by adding noiseto said image. In general, one or more of the following may be done onwhat can be considered to be a high-quality image: the resolution may belowered, the color depth may be decreased, the dynamic range may belowered, focus may be deteriorated, sharpness may be lessened,directional blur may be added, contrast may be lowered, and whitebalance may be adjusted. Similarly, one or more of the following may bedone on what can be considered to be a low-quality image: the resolutionmay be increased, the color depth may be increased, the dynamic rangemay be increased, focus may be improved, sharpness may be increased,directional blur may be removed, contrast may be increased, and whitebalance may be adjusted. The high-quality image is, in this sense,degraded to a medium-quality image, and the low-quality image isimproved to a medium-quality image as well. The medium-quality image canthen be analysed by a ANN and/or CNN, wherein said ANN and/or CNN wassubstantially trained on medium-quality images to begin with.

The method may be performed on a plurality of images. Incoming imagesmay be transformed into images having targeted properties that may bepre-defined, wherein the targeted properties correspond to more moderateimage quality settings. Incoming images that differ in quality, forexample as they are made with different settings, are transformed toimages that have similar, more moderate properties. This includes thesteps of improving some images, and expressly deteriorating others. Thefinal set of modified images has comparable image quality parameters andcan be processed in a more easy and effective way. With this, the objectis achieved.

As defined herein, the modified image is further analysed using an ANNand/or a CNN. The method as defined herein allows all images to betransformed into “medium quality” images that the ANN and/or CNN wastrained on. Thus, by providing medium quality images, the variance ofdifferent input data to the ANN and/or CNN is reduced. Inventorsrealized that instead of always improving the received images (e.g. bymaking them better in terms of less noise, better focus, etc.) it isactually advantageous to introduce steps that make the images “worse”,as it allows a significantly simpler operation to be used compared toincreasing the image quality. This has as a beneficial consequence thatthe training data need not consist of the best possible images. Instead,the network can be trained with “medium quality” images, and the methodas defined herein can be used to transform any subsequently acquiredimages to the known conditions that the original network was trained on.As described above this includes either improving or reducing imagequality before providing the images to the ANN and/or CNN. In this way,proper operation of the ANN and/or CNN is guaranteed without the needfor retraining of the primary NN.

The method as defined herein removes the necessity of retraining neuralnetworks in the field. Instead, the neural network may be trained on acertain type of image, which may include images having more moderateimage quality properties instead of images having excellent imagequality properties. Then, the method as described above may be used totransform incoming images to modified images that are suitable for saidneural network, and the neural network is able to process these imagesin a desired manner. As an extra benefit, in case it is found that thetransformed or modified images are not sufficiently processed by theneural network, the image manipulation technique used in the step ofgenerating a modified image may be altered. It is relatively easy andeffective to modify the image manipulation technique to ensure that themodified images can be processed by the neural network, and thisalleviates the necessity of retraining the neural network. Hence,existing ANN and/or CNN can still be used by transforming the imagesthat are input into the ANN and/or CNN, instead of retraining thenetwork. This is a great advantage, as no new training data or labelsneed to be collected and the image receiving NN, which may be highlycomplicated and deployed in an embedded system that may be hard toretrain, may thus remain unchanged.

It is noted that in the method as defined herein, the transformingincludes both enhancing and degrading incoming images. The enhancing anddegrading is with respect to one or more image parameters, which imageparameters may include resolution, color depth, dynamic range, focus,sharpness, directional blur, contrast, white balance, and noise. Otherimage quality parameters are conceivable as well. The image modificationtechnique used in the method is able to enhance and deteriorate thereceived image for one or more of the parameters stated above. Thoseskilled in the art will be familiar with suitable parameters andalgorithms and the like that are used in these image modificationtechniques.

As already stated above, it is desirable that the set-point for saiddesired image quality parameter corresponds to a moderate image qualityparameter value.

The method may comprise the further step of analysing the modifiedimage. Said analysing may comprise the step of using an artificialneural network (ANN) and/or a convolutional neural network (CNN).

The analysing may comprise the identification of one or more objects insaid image.

The images may be provided to the data processing apparatus in a numberof ways. The images may be retrieved from a non-transitory computerreadable medium. The images may be retrieved from a cloud computingnetwork. The images may be obtained by a camera device that is connectedto the data processing apparatus.

In an embodiment, said image is obtained by a microscope, in particulara charged particle microscope. The charged particle microscope may be anelectron microscope.

According to an aspect, a non-transitory computer readable medium isprovided, wherein said non-transitory computer readable medium hasstored thereon software instructions that, when executed by a dataprocessing apparatus, cause the data processing apparatus to execute themethod as defined herein.

According to an aspect, a charged particle beam device for inspection ofa specimen is provided, comprising:

-   -   A specimen holder for holding a specimen;    -   A source for producing a beam of charged particles;    -   An illuminator for focusing said charged particle beam onto said        specimen;    -   A detector for detecting a flux of radiation emanating from the        specimen in response to said irradiation by said charged        particle beam; and    -   A data processing apparatus.

As defined herein, the charged particle beam device is arranged forexecuting the method as defined herein.

The data processing apparatus may be connected to the detector directlyand receive data and/or images from said detector in a direct manner. Anintermediate connection, for example by means of an additional apparatusin between the detector and the processing apparatus is possible aswell. It is conceivable, for example, that the charged particle beamdevice comprises a controller that is arranged for operating at leastpart of the charged particle beam device. This controller may beconnected, or at least connectable, to the detector and to the dataprocessing apparatus and may be arranged for forwarding (imagecontaining) data from the detector to the processing apparatus. Thecontroller may be arranged for processing the data emanating from thedetector, or may be arranged for forwarding raw data to the dataprocessing apparatus. Once the data is received, the data processingapparatus will be able to execute the method as defined herein. In anembodiment, the controller comprises said data processing apparatus.

According to an aspect, a data processing apparatus is provided that isarranged for executing the method as defined herein.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention will now be elucidated in more detail on the basis ofexemplary embodiments and the accompanying schematic drawings, in which:

FIG. 1—shows a longitudinal cross-sectional view of a charged particlemicroscope according to a first embodiment of the invention;

FIG. 2—shows a longitudinal cross-sectional view of a charged particlemicroscope according to a second embodiment of the invention;

FIG. 3—a flow chart of a first embodiment of the method as definedherein;

FIG. 4—a flow chart of a further embodiment of the method as definedherein;

FIG. 5—an illustration of a possible method of analyzing and processingimages with the method as defined herein.

FIG. 1 (not to scale) is a highly schematic depiction of an embodimentof a charged-particle microscope M according to an embodiment of theinvention. More specifically, it shows an embodiment of atransmission-type microscope M, which, in this case, is a TEM/STEM(though, in the context of the current invention, it could just asvalidly be a SEM (see FIG. 2), or an ion-based microscope, for example).In FIG. 1, within a vacuum enclosure 2, an electron source 4 produces abeam B of electrons that propagates along an electron-optical axis B′and traverses an electron-optical illuminator 6, serving to direct/focusthe electrons onto a chosen part of a specimen S (which may, forexample, be (locally) thinned/planarized). Also depicted is a deflector8, which (inter alia) can be used to effect scanning motion of the beamB.

The specimen S is held on a specimen holder H that can be positioned inmultiple degrees of freedom by a positioning device/stage A, which movesa cradle A′ into which holder H is (removably) affixed; for example, thespecimen holder H may comprise a finger that can be moved (inter alia)in the XY plane (see the depicted Cartesian coordinate system;typically, motion parallel to Z and tilt about X/Y will also bepossible). Such movement allows different parts of the specimen S to beilluminated/imaged/inspected by the electron beam B traveling along axisB′ (in the Z direction) (and/or allows scanning motion to be performed,as an alternative to beam scanning). If desired, an optional coolingdevice (not depicted) can be brought into intimate thermal contact withthe specimen holder H, so as to maintain it (and the specimen Sthereupon) at cryogenic temperatures, for example.

The electron beam B will interact with the specimen S in such a manneras to cause various types of “stimulated” radiation to emanate from thespecimen S, including (for example) secondary electrons, backscatteredelectrons, X-rays and optical radiation (cathodoluminescence). Ifdesired, one or more of these radiation types can be detected with theaid of analysis device 22, which might be a combinedscintillator/photomultiplier or EDX or EDS (Energy-Dispersive X-RaySpectroscopy) module, for instance; in such a case, an image could beconstructed using basically the same principle as in a SEM. However,alternatively or supplement ally, one can study electrons that traverse(pass through) the specimen S, exit/emanate from it and continue topropagate (substantially, though generally with somedeflection/scattering) along axis B′. Such a transmitted electron fluxenters an imaging system (projection lens) 24, which will generallycomprise a variety of electrostatic/magnetic lenses, deflectors,correctors (such as stigmators), etc. In normal (non-scanning) TEM mode,this imaging system 24 can focus the transmitted electron flux onto afluorescent screen 26, which, if desired, can be retracted/withdrawn (asschematically indicated by arrows 26′) so as to get it out of the way ofaxis B′. An image (or diffractogram) of (part of) the specimen S will beformed by imaging system 24 on screen 26, and this may be viewed throughviewing port 28 located in a suitable part of a wall of enclosure 2. Theretraction mechanism for screen 26 may, for example, be mechanicaland/or electrical in nature, and is not depicted here.

As an alternative to viewing an image on screen 26, one can instead makeuse of the fact that the depth of focus of the electron flux leavingimaging system 24 is generally quite large (e.g. of the order of 1meter). Consequently, various other types of analysis apparatus can beused downstream of screen 26, such as:

-   -   TEM camera 30. At camera 30, the electron flux can form a static        image (or diffractogram) that can be processed by        controller/processor 20 and displayed on a display device 14,        such as a flat panel display, for example. When not required,        camera 30 can be retracted/withdrawn (as schematically indicated        by arrows 30′) so as to get it out of the way of axis B′.    -   STEM camera 32. An output from camera 32 can be recorded as a        function of (X,Y) scanning position of the beam B on the        specimen S, and an image can be constructed that is a “map” of        output from camera 32 as a function of X,Y. Camera 32 can        comprise a single pixel with a diameter of e.g. 20 mm, as        opposed to the matrix of pixels characteristically present in        camera 30, although camera 32 can be an Electron Microscope        Pixel Array Detector (EMPAD) as well. Moreover, camera 32 will        generally have a much higher acquisition rate (e.g. 10⁶ points        per second) than camera 30 (e.g. 10² images per second). Once        again, when not required, camera 32 can be retracted/withdrawn        (as schematically indicated by arrows 32′) so as to get it out        of the way of axis B′ (although such retraction would not be a        necessity in the case of a donut-shaped annular dark field        camera 32, for example; in such a camera, a central hole would        allow flux passage when the camera was not in use).    -   As an alternative to imaging using cameras 30 or 32, one can        also invoke spectroscopic apparatus 34, which could be an EELS        module, for example.

It should be noted that the order/location of items 30, 32 and 34 is notstrict, and many possible variations are conceivable. For example,spectroscopic apparatus 34 can also be integrated into the imagingsystem 24.

In the embodiment shown, the microscope M further comprises aretractable X-ray Computed Tomography (CT) module, generally indicatedby reference 40. In Computed Tomography (also referred to as tomographicimaging) the source and (diametrically opposed) detector are used tolook through the specimen along different lines of sight, so as toacquire penetrative observations of the specimen from a variety ofperspectives.

Note that the controller (computer processor) 20 is connected to variousillustrated components via control lines (buses) 20′. This controller 20can provide a variety of functions, such as synchronizing actions,providing setpoints, processing signals, performing calculations, anddisplaying messages/information on a display device (not depicted).Needless to say, the (schematically depicted) controller 20 may be(partially) inside or outside the enclosure 2, and may have a unitary orcomposite structure, as desired. The controller comprises, as shown inthis embodiment, a data processing apparatus P that is arranged forcarrying out the method as defined herein.

The skilled artisan will understand that the interior of the enclosure 2does not have to be kept at a strict vacuum; for example, in a so-called“Environmental TEM/STEM”, a background atmosphere of a given gas isdeliberately introduced/maintained within the enclosure 2. The skilledartisan will also understand that, in practice, it may be advantageousto confine the volume of enclosure 2 so that, where possible, itessentially hugs the axis B′, taking the form of a small tube (e.g. ofthe order of 1 cm in diameter) through which the employed electron beampasses, but widening out to accommodate structures such as the source 4,specimen holder H, screen 26, camera 30, camera 32, spectroscopicapparatus 34, etc.

Now referring to FIG. 2, another embodiment of an apparatus according tothe invention is shown. FIG. 2 (not to scale) is a highly schematicdepiction of a charged-particle microscope M according to the presentinvention; more specifically, it shows an embodiment of anon-transmission-type microscope M, which, in this case, is a SEM(though, in the context of the current invention, it could just asvalidly be an ion-based microscope, for example). In the Figure, partswhich correspond to items in FIG. 1 are indicated using identicalreference symbols, and will not be separately discussed here. Additionalto FIG. 1 are (inter alia) the following parts:

-   -   2 a: A vacuum port, which may be opened so as to        introduce/remove items (components, specimens) to/from the        interior of vacuum chamber 2, or onto which, for example, an        ancillary device/module may be mounted. The microscope M may        comprise a plurality of such ports 2 a, if desired;    -   10 a, 10 b: Schematically depicted lenses/optical elements in        illuminator 6;    -   12: A voltage source, allowing the specimen holder H, or at        least the specimen S, to be biased (floated) to an electrical        potential with respect to ground, if desired;    -   14: A display, such as a FPD or CRT;    -   22 a, 22 b: A segmented electron detector 22 a, comprising a        plurality of independent detection segments (e.g. quadrants)        disposed about a central aperture 22 b (allowing passage of the        beam B). Such a detector can, for example, be used to        investigate (the angular dependence of) a flux of output        (secondary or backscattered) electrons emerging from the        specimen S.

Here also, a controller 20 is present. The controller is connected tothe display 14, and the display 14 may be connectable to a dataprocessing apparatus P that is arranged for carrying out the method asdefined herein. In the embodiment shown, the data processing apparatus Pis a separate structure that does not form part of the controller, anddoes not even form part of the microscope P. The data processingapparatus P may be local or cloud based, and is in principle not limitedto any location.

Now turning to FIG. 3, a flow chart of the method 100 as defined hereinis shown. The method, which is implemented by a data processingapparatus P, comprises the steps of:

-   -   receiving 101 an image;    -   providing 111 a set-point for a desired image quality parameter        of said image;    -   processing 102 said image using an image analysis technique for        determining a current image quality parameter of said image 103;    -   comparing 103 said current image quality parameter with said        desired set-point 111; and    -   generating 104, based on said comparison, a modified image by        using an image modification technique, wherein said generating        104 comprises the steps of:        -   Improving 104 a said image in terms of said image quality            parameter in case said current image quality parameter is            lower than said set-point; and        -   Deteriorating 104 b said image in terms of said image            quality parameter in case said current image quality            parameter exceeds said set-point; and    -   outputting 105 said modified image.

Said step of generating 104 a modified image may comprise the step ofusing an artificial neural network (ANN) and/or a convolutional neuralnetwork (CNN). Other image modification techniques may be used as well.

FIG. 4 shows a further embodiment of the method as defined herein. Thisembodiment is similar to the embodiment shown in FIG. 3 but includes thefurther step of analysing 106 the modified image. The analysing can bedone using an ANN and/or CNN, and may include segmentation of themodified image, for example, and/or identifying of one or more objectsin said modified image. Analysis may include image reconstructiontechniques as well.

The image received by the data processing apparatus P may be provided bya charged particle microscope M as shown in FIG. 1 or FIG. 2. Other waysof providing images to the data processing apparatus P are conceivableas well.

FIG. 5 shows an example of how the method as defined herein operates, inan example. Here, three input images 201-203 are shown. The left image201 has a low image quality (illustrated by lower contrast, lowersharpness, low detail, which can also be referred to as data wheredesired information can hardly be extracted with standard imageprocessing techniques), the middle image 202 has an medium image quality(medium contrast, medium sharpness and medium details, which may also bereferred to as data of sufficient quality to extract desired informationin a complicated way with standard image processing techniques), and theright image 203 has a high image quality (high contrast, high sharpness,and high detail, which may also be referred to as data of sufficientquality to easily extract desired information with standard imageprocessing techniques). The method as defined herein is able todetermine one or more image parameters from the input images 201-203,and then compare these one or more image parameters to a desired,targeted image quality parameter. In the method as defined herein, thedesired image quality parameter corresponds to a targeted, more moderateimage quality parameter value. Each of the images 201-203 is processedby the data processing apparatus and compared to a desired quality, andthen an image modification technique is applied to generate an imagethat has the targeted image quality, for example. In the embodimentshown, the method is arranged for transforming the left input image 201to a moderate quality image 211 by increasing the quality with respectto contrast, sharpness and detail. The method is also arranged fortransforming the right input image 203 to a moderate quality image 211by deteriorating the quality with respect to contrast, sharpness anddetail. For the middle image 202, where the determined quality parametermay not deviate much from the desired quality parameter, it isconceivable that no image transformation technique is applied. Hence, inan embodiment, the method comprises the step of maintaining the inputimage 202 as the output image 211 in case the determined image qualityparameter is equal to, or within a limited threshold of, said desiredimage quality parameter. In other embodiments, the middle image 202 maynevertheless be transformed with respect to said quality parameter. Inany event, the input images 201-203 will be processed, and may beimproved, deteriorated, and/or passed through, eventually leading to(virtually) the same image 211.

Once the output image 211 is formed, a further analysis may be performedon the output image 211, using a ANN and/or CNN, for example. In FIG. 5,the ANN and/or CNN may be used to identify particles 231-234 andcorresponding regional boundaries 241-244. It is noted that this can bedone for each of the three input images 201-203. The resulting outputimage 211 should not be considered to be an averaged image 211 of thethree input images 201-203.

It is noted that the method as defined herein is described in referenceto images. The method as defined herein is in principle applicable toany 2D or 3D representation. The images as defined herein may relate inone embodiment to images that are obtainable by charged particlemicroscopy, including EM images, BSE images, spectral images such asEELS, etcetera.

The method has been described above by means of several non-limitingexamples. The desired protection is determined by the appended claims.

1. A method implemented by a data processing apparatus, comprising:receiving an image; providing a set-point for a desired image qualityparameter of said image; processing said image using an image analysistechnique for determining a current image quality parameter of saidimage; comparing said current image quality parameter with said desiredset-point, and generating, based on said comparison, a modified image byusing an image modification technique, wherein said generating comprisesthe steps of: improving said image in terms of said image qualityparameter in case said current image quality parameter is lower thansaid set-point; and deteriorating said image in terms of said imagequality parameter in case said current image quality parameter exceedssaid set-point; and outputting and analysing said modified image,wherein said analysing comprises the step of using an artificial neuralnetwork (ANN) and/or a convolutional neural network (CNN) on saidmodified image.
 2. Method according to claim 1, wherein said imagemodification technique comprises the step of using an artificial neuralnetwork (ANN) and/or a convolutional neural network (CNN).
 3. Methodaccording to claim 1, wherein said set-point for said desired imagequality parameter corresponds to a moderate image quality parametervalue.
 4. Method according to claim 1, wherein said image qualityparameter comprises one or more parameters chosen from the groupconsisting of: resolution, color depth, dynamic range, focus, sharpness,directional blur, contrast, white balance, and noise.
 5. Methodaccording to claim 1, wherein said set-point corresponds to a mediumquality of said image parameter.
 6. Method according to claim 1, whereinsaid step of analysing comprises the identification of one or moreobjects in said image.
 7. Method according to claim 1, wherein saidimage is obtained by a microscope, in particular a charged particlemicroscope.
 8. Method according to claim 1, wherein said image qualityparameter consists of one or more parameters chosen from the groupconsisting of: image resolution, image focus, and image noise.
 9. Anon-transitory computer readable medium having stored thereon softwareinstructions that, when executed by a data processing apparatus, causethe data processing apparatus to execute the method according toclaim
 1. 10. A charged particle beam device for inspection of aspecimen, comprising: a specimen holder for holding a specimen; a sourcefor producing a beam of charged particles; an illuminator for focusingsaid charged particle beam onto said specimen; a detector for detectinga flux of radiation emanating from the specimen in response to saidirradiation by said charged particle beam; and a data processingapparatus coupled to at least the detector, and the data processingapparatus including code that, when executed by the data processingapparatus, causes the data processing apparatus to: receive an image;provide a set-point for a desired image quality parameter of said image;process said image using an image analysis technique to determine acurrent image quality parameter of said image; compare said currentimage quality parameter with said set-point, and generate, based on saidcomparison, a modified image based on an image modification technique,wherein to generate a modified image comprises: improve said image interms of said image quality parameter in case said current image qualityparameter is lower than said set-point; and deteriorate said image interms of said image quality parameter in case said current image qualityparameter exceeds said set-point; and output and analyse said modifiedimage, wherein said analysing comprises the step of using an artificialneural network (ANN) and/or a convolutional neural network (CNN) on saidmodified image.
 11. A method comprising: providing a set-point for adesired image quality parameter; processing an image using an imageanalysis technique for determining a current image quality parameter ofsaid image; comparing said current image quality parameter with saidset-point; based on the image quality parameter being lower than saidset-point, improving said image; based on the image quality parameterbeing higher than said set-point, deteriorating said image; andoutputting and analysing said modified image, wherein said analysingcomprises the step of using an artificial neural network (ANN) and/or aconvolutional neural network (CNN) on said modified image.
 12. Themethod of claim 11, wherein improving said image includes improving saidimage in terms of said image quality parameter.
 13. The method of claim11, wherein deteriorating said image includes deteriorating said imagein terms of said image quality parameter.
 14. The method of claim 11,wherein said image modification technique comprises the step of using anartificial neural network (ANN) and/or a convolutional neural network(CNN).
 15. The method of claim 11, wherein said set-point for said imagequality parameter corresponds to a moderate image quality parametervalue.
 16. The method of claim 11, wherein said image quality parametercomprises one or more parameters chosen from the group consisting of:resolution, color depth, dynamic range, focus, sharpness, directionalblur, contrast, white balance, and noise.
 17. The method of claim 11,wherein said set-point corresponds to a medium quality of said imageparameter.
 18. The method of claim 11, wherein said step of analysingcomprises the identification of one or more objects in said image. 19.The method of claim 11, wherein said image is obtained by a microscope,in particular a charged particle microscope.
 20. The method of claim 11,wherein said image quality parameter consists of one or more parameterschosen from the group consisting of: image resolution, image focus, andimage noise.